#ifndef __TABLE_H__
#define __TABLE_H__

#include <string.h>

#define INTEGER 0
#define FLOAT 1
#define STRING 2
#define BOOL 3
#define UNDEF -1
#define EXPR -4

#define GLOBAL 0
#define LOCAL 1
#define INSTANCE 2
#define COMP 3

struct var {
  char * nom;
  char* reg;
  int type;
  int portee;
  char * code;
  int allocated;
  struct var * prec;
}; 


struct table;

struct table * initTable();
void supprTable(struct table * tab);
struct var * creerVar(struct table * tab, char * nom, int type);
void DebugAfficher(struct var * var);
void ajouterCode(struct var* var, char* code);
int memeType(struct var * var1, struct var * var2);
int estType(struct var * var , int type);
struct var * existe(struct table * tab, char * nom);
void effacerCode(struct var* var);
#endif
